<?php if ($pager['pageCount']>0) foreach  ($data as $v):?>
<li>
	<div>
		<span><img src="<?php echo $_BASE_DIR;?>images/<?php echo $v->all_score;?>.jpg"/></span>
		<span>画面质量：<a><?php echo scoretostr($v->screen_score,'screen');?></a></span>
		<span>上手难度：<a><?php echo scoretostr($v->operation_score,'operation');?></a></span>
		<span>操作手感：<a><?php echo scoretostr($v->play_score,'play');?></a></span>
	</div>
	<p><?php echo $v->content;?></p>
	<p>
		<a>推荐特色：</a><?php echo $v->original;?>
	</p>
</li>
<?php endforeach; else echo '<li>暂无评论，等您来抢沙发！</li>';?>

<li class="pager">	
	<?php if ($pager['pageCount']>0): ?>
		<a href="javascript:showCommentByGid('<?php echo $gid;?>',<?php echo $pager['pageCount'];?>);">尾页</a>
		<?php if ($pager['page']+4 < $pager['pageCount']): ?>
		<a href="javascript:showCommentByGid('<?php echo $gid;?>',<?php echo $pager['page']+4;?>);">...</a>
		<?php endif;?>
	 	<?php for ($i=$pager['page']+3;$i>=$pager['page']-3;$i--): ?>
			<?php if ($i==$pager['page']): ?>
				<a class="on"><?php echo $i;?></a>
			<?php elseif ($i<=$pager['pageCount'] && $i>0): ?>
				<a href="javascript:showCommentByGid('<?php echo $gid;?>',<?php echo $i;?>);"><?php echo $i;?></a>
			<?php endif; ?>
		<?php endfor;?>
		<?php if ($pager['page']-4 > 1): ?>
		<a href="javascript:showCommentByGid('<?php echo $gid;?>',<?php echo $pager['page']-4;?>);">...</a>
		<?php endif;?>
		<a href="javascript:showCommentByGid('<?php echo $gid;?>',1);">首页</a>	
	<?php endif;?>
	<div class="clear"></div>
</li>
<?php
function scoretostr($score,$type='screen'){
	$arr = array(
		'screen'=>array('很差','差','一般','好','很好'),
		'operation'=>array('很差','差','一般','好','很好'),
		'play'=>array('很难','难','一般','容易','很容易'),
	);
	return $arr[$type][$score-1];
}
?>